﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using ELearningSystem.Core.Interface;
using ELearningSystem.Core.Manager;
using ELearningSystem.DAO.DAO;


namespace ELearningSystem.Service
{
    /// <summary>
    /// Summary description for PracticeService
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class PracticeService : System.Web.Services.WebService,IPracticeManager
    {
        IPracticeManager practiceManager = new PracticeManager();
        [WebMethod]
        public bool CheckIfSubmittedAnswersAreCorrect(PracticeDAO practice, List<AnswerDAO> answers, out string message)
        {
            return practiceManager.CheckIfSubmittedAnswersAreCorrect(practice, answers, out message);
        }
    }
}
